package tests

object SampleTest extends TestCase {

  beforeTestCase("optional description") {
    
  }

  before("optional description") {
    
  }

  before("optional description") {
    
  }

  // simple tests
  test("optional description") {
    assert obj1 equals obj2
    assert obj1 nonNull
    assert obj1 isNull
    assert 1 >= 0
    assert 10 < x <= 100
  }
  
  "test description" {
    assert "a string" ~= "regexp"
    "a list must contains obj" assert aList contains obj
  }
  // end of simple tests
  
  // timed out tests
  test("optional description", /* timeout */ 10) {
    assert 10 < x <= 100
  }

  "test description" timeout= 10.s {
    assert "a string" ~= "regexp"
    "a list must contains obj" assert aList contains obj
  }

  "test description" {
    assert { aBigMethod() } executedWithTimeout 10.min
    assert { aBigMethodChild() } executedWithTimeout 15
  }
  
  // end of timed out tests

  // tests with exceptions
  
  test("optional description", new Exception) {
    assert 10 < x <= 100
  }
  
  "test description" throws new Exception {
    assert "a string" ~= "regexp"
    "a list must contains obj" assert aList contains obj
  }

  "test description" {
    assert { aMethod() } throws new Exception
    assert { aMethodChild() } throws new Exception
  }

  // end of tests with exceptions

  // skiped tests
  
  test("optional description", new Exception) {
    assert 10 < x <= 100
  }.skip "because not implemented yet"
  
  "because not implemented yet" skip "test description" throws new Exception {
    assert "a string" ~= "regexp"
    "a list must contains obj" assert aList contains obj
  }

  "because not implemented yet" skip "test description" {
    assert { aMethod() } throws new Exception
    assert { aMethodChild() } throws new Exception
  }

  // end of skiped tests

  after("optional description") {
    
  }

  afterTestCase("optional description") {
    
  }

}

object SampleSuite extends Suite {

  beforeTestSuite("optional description") {
    
  }


  afterTestSuite("optional description") {
    
  }

}
